import 'package:shared_preferences/shared_preferences.dart';

class Storage {
  static late SharedPreferences _sharedPreferences;
  static void init(SharedPreferences sharedPreferences) {
    _sharedPreferences = sharedPreferences;
  }

  static setString(String key, String value) {
    _sharedPreferences.setString(key, value);
  }

  static String? getString(String key) {
    return _sharedPreferences.getString(key);
  }

  static void remove(String key) {
    _sharedPreferences.remove(key);
  }

  static setBool(String key, bool value) {
    _sharedPreferences.setBool(key, value);
  }

  static bool? getBool(String key) {
    return _sharedPreferences.getBool(key);
  }
}
